package cn.cheegon.blog.service;

import cn.cheegon.blog.common.api.CommonPage;
import cn.cheegon.blog.entity.dto.CommentDto;
import cn.cheegon.blog.entity.dto.CommentTreeDto;
import cn.cheegon.blog.model.CmsBlog;
import cn.cheegon.blog.model.CmsComment;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * <p>
 * 评论表 服务类
 * </p>
 *
 * @author cheegon
 * @since 2024-06-21
 */
public interface CmsCommentService extends IService<CmsComment> {
    CommonPage<CommentDto> getList(Long blogId, Integer status, int pageNum, int pageSize);

    CommonPage<CommentTreeDto> getTreeList(Long blogId, Long parentId, int pageNum, int pageSize);

    List<CommentTreeDto> getChildCommentList(Long blogId, Long parentId,int pageNum, int pageSize);

    void add(CmsComment dto);

    void edit(CmsComment dto);

    void del(Long id);
}
